import 'package:library_base/entities/generated/json/base/json_convert_content.dart';
import 'package:library_base/entities/account_rule_entity.dart';

AccountRuleEntity $AccountRuleEntityFromJson(Map<String, dynamic> json) {
  final AccountRuleEntity loginBeanEntity = AccountRuleEntity();

  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    loginBeanEntity.id = id;
  }
  final String? ruleCode = jsonConvert.convert<String>(json['ruleCode']);
  if (ruleCode != null) {
    loginBeanEntity.ruleCode = ruleCode;
  }
  final String? ruleType = jsonConvert.convert<String>(json['ruleType']);
  if (ruleType != null) {
    loginBeanEntity.ruleType = ruleType;
  }

  final double? unitPrice = jsonConvert.convert<double>(json['unitPrice']);
  if (unitPrice != null) {
    loginBeanEntity.unitPrice = unitPrice;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    loginBeanEntity.creator = creator;
  }

  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    loginBeanEntity.createTime = createTime;
  }
  final String? ruleJoint = jsonConvert.convert<String>(json['ruleJoint']);
  if (ruleJoint != null) {
    loginBeanEntity.ruleJoint = ruleJoint;
  }
  return loginBeanEntity;
}

Map<String, dynamic> $AccountRuleEntityToJson(AccountRuleEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['ruleCode'] = entity.ruleCode;
  data['ruleType'] = entity.ruleType;
  data['unitPrice'] = entity.unitPrice;
  data['creator'] = entity.creator;
  data['createTime'] = entity.createTime;
  data['ruleJoint'] = entity.ruleJoint;
  return data;
}
